package invoice;

import invoice.header.ChineseHeader;
import invoice.header.EnglishHeader;
import invoice.header.Header;
import invoice.line.EnglishLine;
import invoice.line.Line;

/*
    API:
    构造发票行数组，发票头数组，
    传入Controller类中setAndPrintInvoice()方法，
    将自动生成发票并打印
 */
public class Client {
    public static void main(String[] args){
        //手动添加发票并打印
        Header headers[]={new ChineseHeader("哈尔滨工业大学"),new EnglishHeader("Harbin Institute of Technology")};
        Line lines[]={new EnglishLine("apple",2,3.5),
                new EnglishLine("banana",2,2),
                new EnglishLine("coconut",3,4.98)
            };
        new Controller().setAndPrintInvoice(headers,lines);
    }
}
